package com.aspose.cells;

import java.util.ArrayList;

class zcbn extends zcdb {
   zcbn() {
      this.d = 64;
   }

   void a(Validation var1) throws Exception {
      byte var2 = 20;
      int var10 = var2 + var1.getAreaList().size() * 16 + 4;
      if (var1.getErrorTitle() != null) {
         var10 += var1.getErrorTitle().length() * 2;
      }

      if (var1.getErrorMessage() != null) {
         var10 += var1.getErrorMessage().length() * 2;
      }

      if (var1.getInputTitle() != null) {
         var10 += var1.getInputTitle().length() * 2;
      }

      if (var1.getInputMessage() != null) {
         var10 += var1.getInputMessage().length() * 2;
      }

      byte[] var3 = var1.d();
      if (var3 != null) {
         var10 += var3.length + 4 + 4;
      } else {
         var10 += 8;
      }

      byte[] var4 = var1.e();
      if (var4 != null) {
         var10 += var4.length + 4 + 4;
      } else {
         var10 += 8;
      }

      this.c = new byte[var10];
      long var5 = 0L;
      long var7 = 0L;
      switch(var1.getType()) {
      case 0:
         var7 = 0L;
         break;
      case 1:
         var7 = 1L;
         break;
      case 2:
         var7 = 2L;
         break;
      case 3:
         var7 = 3L;
         break;
      case 4:
         var7 = 4L;
         break;
      case 5:
         var7 = 5L;
         break;
      case 6:
         var7 = 6L;
         break;
      case 7:
         var7 = 7L;
      }

      var5 |= var7;
      var7 = 0L;
      switch(var1.getAlertStyle()) {
      case 0:
         var7 = 32L;
         break;
      case 1:
         var7 = 0L;
         break;
      case 2:
         var7 = 16L;
      }

      var5 |= var7;
      if (var1.getIgnoreBlank()) {
         var5 |= 256L;
      }

      if (!var1.getInCellDropDown()) {
         var5 |= 512L;
      }

      var7 = 0L;
      switch(var1.c()) {
      case 0:
         var7 = 0L;
         break;
      case 1:
         var7 = 1L;
         break;
      case 2:
         var7 = 2L;
         break;
      default:
         var7 = 0L;
      }

      var5 |= var7 << 10 & 4294967295L;
      if (var1.getShowInput()) {
         var5 |= 262144L;
      }

      if (var1.getShowError()) {
         var5 |= 524288L;
      }

      var7 = 0L;
      switch(var1.getOperator()) {
      case 0:
         var7 = 0L;
         break;
      case 1:
         var7 = 2L;
         break;
      case 2:
         var7 = 4L;
         break;
      case 3:
         var7 = 6L;
         break;
      case 4:
         var7 = 5L;
         break;
      case 5:
         var7 = 7L;
      case 6:
      default:
         break;
      case 7:
         var7 = 1L;
         break;
      case 8:
         var7 = 3L;
      }

      var5 |= var7 << 20 & 4294967295L;
      System.arraycopy(com.aspose.cells.b.a.zc.a(var5), 0, this.c, 0, 4);
      zcch.a((ArrayList)var1.getAreaList(), this.c, 4);
      int var9 = var1.getAreaList().size() * 16 + 4 + 4;
      var9 = zcch.a(this.c, var9, var1.getErrorTitle());
      var9 = zcch.a(this.c, var9, var1.getErrorMessage());
      var9 = zcch.a(this.c, var9, var1.getInputTitle());
      var9 = zcch.a(this.c, var9, var1.getInputMessage());
      if (var3 != null) {
         System.arraycopy(com.aspose.cells.b.a.zc.a(var3.length), 0, this.c, var9, 4);
         var9 += 4;
         System.arraycopy(var3, 0, this.c, var9, var3.length);
         var9 += var3.length + 4;
      } else {
         var9 += 8;
      }

      if (var4 != null) {
         System.arraycopy(com.aspose.cells.b.a.zc.a(var4.length), 0, this.c, var9, 4);
         var9 += 4;
         System.arraycopy(var4, 0, this.c, var9, var4.length);
      }

   }
}
